package com.bm.server.controller;


import com.bm.server.service.intf.JoinAllyService;
import com.bm.server.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * Hey man，take your time！
 *
 * @Author: 李松洋
 * @Description:代码永不报错，工资永在上涨！！！
 * @Date: Create in 10:47 2022/7/23
 */
@RestController
@RequestMapping("/api/joinAlly")
@Api(tags = "加入联盟-李松洋")
@CrossOrigin
public class JoinAllyController {
    @Resource
    private JoinAllyService service;
    @PostMapping("join.do")
    @ApiOperation(value = "加入联盟")
    public R join(int allyid, Long uid){
        return service.one(allyid, uid);
    }
    @ApiOperation(value = "查人数")
    @GetMapping("num.do")
    public  R num(@RequestParam int allyid){
        return service.query(allyid);
    }
}
